from django.conf.urls.defaults import *
from lab.books.models import Book

books_dict = {
	'queryset' : Book.objects.all(),
}

urlpatterns = patterns('',
	(r'^create/$','lab.books.views.book_form'),
	(r'^update/(?P<slug>[-\w]+)/$','lab.books.views.book_form'),
)  

urlpatterns += patterns('django.views.generic',
   (r'^delete/(?P<object_id>\d+)/$','create_update.delete_object',dict(model = Book, post_delete_redirect = '/books/')),
   (r'^manage/$','simple.direct_to_template',{'template':'books/manage.html'}),
   (r'^$','list_detail.object_list', books_dict),
)


